package com.zzh.controller;

import com.zzh.controller.utils.R;
import com.zzh.pojo.Captcha;
import com.zzh.service.impl.CaptchaServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/*
 * @Auther : wenrouyue
 * @Date : 2022/3/9-22:50
 */
@RestController
public class CaptchaController {
    @Autowired
    private CaptchaServiceImpl captchaService;

    @RequestMapping("/getCode")
    public R getCode(@RequestBody Captcha captcha){
        return captchaService.addCode(captcha);
    }
}
